]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
mpris: Fall back to app icon first
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 19 Apr 2023 10:54:17 +0000 (12:54 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 15 May 2023 16:05:31 +0000 (16:05 +0000)
When no cover art is available, the app icon at least allows
distinguishing between different players, so try falling back
to that before using the generic icon name.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2755>

js/ui/mpris.js

index 93d1ec68b66f2d469e2be4eb62da40df240d5035..2ccd0c44ba895875eadcadea9ab4ac0a070fd6bf 100644 (file)
@@ -70,6 +70,9 @@ class MediaMessage extends MessageList.Message {
             let file = Gio.File.new_for_uri(this._player.trackCoverUrl);
             this._icon.gicon = new Gio.FileIcon({ file });
             this._icon.remove_style_class_name('fallback');
+        } else if (this._player.app) {
+            this._icon.gicon = this._player.app.icon;
+            this._icon.add_style_class_name('fallback');
         } else {
             this._icon.icon_name = 'audio-x-generic-symbolic';
             this._icon.add_style_class_name('fallback');